public class Main1 {

    public  int find(String A,String B){
        int ans=-1;
        int len1 = A.length();
        int len2 = B.length();
        if (len1>len2){
            for (int i = 0; i < len1 - len2; i++) {
                int j=0;
                int temp=i;
                while (A.charAt(temp)==B.charAt(j)&&j<len2&&temp<i+len2){
                        temp++;
                        j++;
                    }
                if (j==len2){
                    ans=i;
                    break;
                }
            }
        }
        return  ans;
    }


}
